//
//  UITextField+RGAppUtitils.h
//  MovingLoaniOS
//
//  Created by RAIN on 2019/2/18.
//  Copyright © 2019 GWMFC. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void(^TextLengthBlock)(NSInteger length);
/**
 Text Field 字符串类型

 - TextFieldStringTypeNone: 不限制
 - TextFieldStringTypeNumber: 数字
 - TextFieldStringTypeLetter: 字母
 */
typedef NS_ENUM(NSUInteger, TextFieldStringType) {
    /// 不限制
    TextFieldStringTypeNone     =   0,
    /// 数字
    TextFieldStringTypeNumber   =   1,
    ///  字母
    TextFieldStringTypeLetter   =   2
};

@interface UITextField (RGAppUtitils)
/**允许输入最大字符长度*/
@property (assign, nonatomic) IBInspectable NSInteger maxLength;

@property (nonatomic , copy) TextLengthBlock lengthBlock;



- (void)rg_addRightViewWithImageName:(NSString *)imageName;

- (void)rg_addRightImageByName:(NSString *)name
                         frame:(CGRect)frame
                   contentMode:(UIViewContentMode)contentMode
                      showMode:(UITextFieldViewMode)showMode;

@end

